home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / cxl52_1.zip / CXLSTR.H < prev    next >
Text File  |  1990-02-17  |  4KB  |  81 lines

  1. /*
  2.    ┌──────────────────────────────────────────────────────────────────────────┐
  3.    │                                                                          │
  4.    │  CXLSTR.H  -  CXL is Copyright (c) 1987-1990 by Mike Smedley.            │
  5.    │                                                                          │
  6.    │  This header file contains function prototypes and definitions for       │
  7.    │  string manipulating functions.                                          │
  8.    │                                                                          │
  9.    └──────────────────────────────────────────────────────────────────────────┘
  10. */
  11.  
  12. #if defined(__TURBOC__)                         /* Turbo C */
  13.     #if __STDC__
  14.         #define _Cdecl
  15.     #else
  16.         #define _Cdecl  cdecl
  17.     #endif
  18.     #define _Near
  19. #elif defined(__ZTC__)                          /* Zortech C++ */
  20.     #define _Cdecl
  21.     #define _Near
  22. #elif defined(M_I86) && !defined(__ZTC__)       /* Microsoft C/QuickC */
  23.     #if !defined(NO_EXT_KEYS)
  24.         #define _Cdecl  cdecl
  25.         #define _Near   near
  26.     #else
  27.         #define _Cdecl
  28.         #define _Near
  29.     #endif
  30. #endif
  31.  
  32. /*---------------------------[ function prototypes ]-------------------------*/
  33.  
  34. int      _Cdecl cvaltype(int ch,int ctype);
  35. double   _Cdecl cvtcf(char *field,int wholesize,int fracsize);
  36. int      _Cdecl cvtci(char *field);
  37. void     _Cdecl cvtfc(char *field,double value,int wholesize,int fracsize);
  38. void     _Cdecl cvtic(char *field,int value,int size);
  39. int      _Cdecl strblank(char *str);
  40. char    *_Cdecl strbmatch(char *str,char *strarr[]);
  41. int      _Cdecl strchg(char *str,int oldch,int newch);
  42. unsigned long _Cdecl strchksum(char *str);
  43. char    *_Cdecl strcode(char *str,char *key);
  44. char    *_Cdecl strdel(char *substr,char *str);
  45. char    *_Cdecl strdela(char *substr,char *str);
  46. int      _Cdecl strichg(char *str,int oldch,int newch);
  47. unsigned long _Cdecl strichksum(char *str);
  48. char    *_Cdecl stridel(char *substr,char *str);
  49. char    *_Cdecl stridela(char *substr,char *str);
  50. char    *_Cdecl striinc(char *str1,char *str2);
  51. char    *_Cdecl strinc(char *str1,char *str2);
  52. char    *_Cdecl strins(char *instr,char *str,int st_pos);
  53. int      _Cdecl striocc(char *str,int ch);
  54. char    *_Cdecl strischg(char *str,char *find,char *replace);
  55. int      _Cdecl strisocc(char *str1,char *str2);
  56. char    *_Cdecl strisrep(char *str,char *search,char *replace);
  57. char    *_Cdecl strljust(char *str);
  58. char    *_Cdecl strltrim(char *str);
  59. int      _Cdecl strmatch(char *str1,char *str2);
  60. char    *_Cdecl strmid(char *str,int st_pos,int num_chars);
  61. int      _Cdecl strocc(char *str,int ch);
  62. char    *_Cdecl strrjust(char *str);
  63. char    *_Cdecl strrol(char *str,int count);
  64. char    *_Cdecl strror(char *str,int count);
  65. char    *_Cdecl strschg(char *str,char *find,char *replace);
  66. char    *_Cdecl strsetsz(char *str,int newsize);
  67. char    *_Cdecl strshl(char *str,int count);
  68. char    *_Cdecl strshr(char *str,int count);
  69. int      _Cdecl strsocc(char *str1,char *str2);
  70. char    *_Cdecl strsrep(char *str,char *search,char *replace);
  71. char    *_Cdecl strtrim(char *str);
  72. char    *_Cdecl struplow(char *str);
  73. int      _Cdecl touplow(char *str,char *pos,int ch);
  74.  
  75. /*-----------------------[ macro-function definitions ]----------------------*/
  76.  
  77. #define strbtrim(st)        strtrim(strltrim(st))
  78. #define strleft(st,nu)      strmid(st,0,nu)
  79. #define strright(st,nu)     strmid(st,strlen(st)-nu,nu)
  80. #define strrtrim(st)        strtrim(st)
  81.